using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;

using MarketPlace.Data.Bases;

namespace MarketPlace.Data.DomainModels
{
    [JsonObject(MemberSerialization.OptIn)]
    public partial class ContactInfo : BusinessBase<long>
    {
        #region Declarations

		private string _realName = String.Empty;
		private string _sex = String.Empty;
		private string _email = String.Empty;
		private string _phone = String.Empty;
		private string _fax = null;
		private string _mobile = null;
		
		private Company _company = null;
		
		
		#endregion

        #region Constructors

        public ContactInfo() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            
            sb.Append(this.GetType().FullName);
			sb.Append(_realName);
			sb.Append(_sex);
			sb.Append(_email);
			sb.Append(_phone);
			sb.Append(_fax);
			sb.Append(_mobile);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        [JsonProperty]
		public virtual string RealName
        {
            get { return _realName; }
			set
			{
				OnRealNameChanging();
				_realName = value;
				OnRealNameChanged();
			}
        }
		partial void OnRealNameChanging();
		partial void OnRealNameChanged();
		
        [JsonProperty]
		public virtual string Sex
        {
            get { return _sex; }
			set
			{
				OnSexChanging();
				_sex = value;
				OnSexChanged();
			}
        }
		partial void OnSexChanging();
		partial void OnSexChanged();
		
        [JsonProperty]
		public virtual string Email
        {
            get { return _email; }
			set
			{
				OnEmailChanging();
				_email = value;
				OnEmailChanged();
			}
        }
		partial void OnEmailChanging();
		partial void OnEmailChanged();
		
        [JsonProperty]
		public virtual string Phone
        {
            get { return _phone; }
			set
			{
				OnPhoneChanging();
				_phone = value;
				OnPhoneChanged();
			}
        }
		partial void OnPhoneChanging();
		partial void OnPhoneChanged();
		
        [JsonProperty]
		public virtual string Fax
        {
            get { return _fax; }
			set
			{
				OnFaxChanging();
				_fax = value;
				OnFaxChanged();
			}
        }
		partial void OnFaxChanging();
		partial void OnFaxChanged();
		
        [JsonProperty]
		public virtual string Mobile
        {
            get { return _mobile; }
			set
			{
				OnMobileChanging();
				_mobile = value;
				OnMobileChanged();
			}
        }
		partial void OnMobileChanging();
		partial void OnMobileChanged();
		
		public virtual Company Company
        {
            get { return _company; }
			set
			{
				OnCompanyChanging();
				_company = value;
				OnCompanyChanged();
			}
        }
		partial void OnCompanyChanging();
		partial void OnCompanyChanged();
		
        #endregion
    }
}
